﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace WebeTerm.Common
{
    /// <summary>
    /// 平台自定义异常基类
    /// </summary>
    public abstract class BaseException:System.Exception
    {
        private string __message = string.Empty;
        public override string Message
        {
            get
            {
                return __message;
            }
        }

        protected int code;
        public virtual int Code { get { return code; } }


        protected BaseException(int errorCode):this(errorCode,string.Empty){

        }


        protected BaseException(int errorCode, string exception)
        {
            code = errorCode;
            __message = exception;
        }

        protected BaseException(string exception):this(1000,exception) {
        }
    }
}
